<script>
jQuery(document).ready(function($){	

	$("#voltar").click(function() {

		var student = "<?php echo $student ?>";
		var unitid = "<?php echo $unitid ?>";
		
		var url = "<?php echo WWW_APP ?>" + "follow/log/student/" + student + "/unit/" + unitid; 

		window.location.href = url;
	}); 
});
</script>
<div id="sumary_view">
	<?php echo $treeview;?>
</div>
<div id="exams">
	<?php 
	if(!empty($exams)) {
	?>
	<ul>
		<?php 
		$i = 1;
		foreach($exams as $key=>$value) {
		?>
			<li>
				<a href="<?php echo WWW_APP.'follow/questions/student/'.$value->userid.'/unit/'.$value->unitid.'/exam/'.$value->id?>"><?php echo "Tentativa ".$i." - Nota: ".$value->note; ?></a>
			</li>
		<?php 
			$i++;
		}
		?>
	</ul>	
	<?php 
	}else {
	?>
		Aluno não fez nenhuma prova ainda.	
		<br class="clear" />
	<?php 	
	}
	?>
	<br class="clear" />
	<input id="voltar" type="button" value="Voltar" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only right">
	<br class="clear" />
</div>

<br class="clear" />